    <%
'Funcion para generar codigo de barra

'Code 39 barcodes require an asterisk as the start and stop characters
'Response.write "<IMG SRC=""/expedientes/img/barcode/asterisk.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"

For x = 1 to Len(Trim(BarCodeText))
	select case mid(BarCodeText,x,1)
	case "1":Response.Write "<IMG SRC=""/expedientes/img/barcode/1.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "2":Response.Write "<IMG SRC=""/expedientes/img/barcode/2.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "3":Response.Write "<IMG SRC=""/expedientes/img/barcode/3.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "4": Response.Write "<IMG SRC=""/expedientes/img/barcode/4.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "5": Response.Write "<IMG SRC=""/expedientes/img/barcode/5.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "6": Response.Write "<IMG SRC=""/expedientes/img/barcode/6.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "7": Response.Write "<IMG SRC=""/expedientes/img/barcode/7.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "8": Response.Write "<IMG SRC=""/expedientes/img/barcode/8.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "9": Response.Write "<IMG SRC=""/expedientes/img/barcode/9.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			case "0": Response.Write "<IMG SRC=""/expedientes/img/barcode/0.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
			
		case else									
			Response.Write "<IMG SRC=""/expedientes/img/barcode/" & mid(BarCodeText,x,1) & _
				 ".gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"
	end select
Next

'Code 39 barcodes require an asterisk as the start and stop characters
'Response.write "<IMG SRC=""/expedientes/img/barcode/asterisk.gif"" WIDTH=""" & xwidth & """ HEIGHT=""" & xheight & """>"


    %>
